// launch管理接口api
import { fetch } from '@/utils/fetch.js';
// 获取launch信息
export function getLaunchInfo(params) {
  return fetch({
    url: '/launch/launchManage/index',
    method: 'GET',
    data: params,
  });
}
// launch列表
export function getLaunchList(params) {
  return fetch({
    url: '/launch/launchManage/list',
    method: 'GET',
    data: params,
  });
}
// 版本上线
export function onlineLaunch(params) {
  return fetch({
    url: '/launch/launchManage/onlineLaunch',
    method: 'POST',
    data: params,
  });
}
// 发布新版本launch
export function launchAdd(params) {
  return fetch({
    url: '/launch/launchManage/add',
    method: 'POST',
    data: params,
  });
}
// 查看学校列表
export function getSchoolList(params) {
  return fetch({
    url: '/launch/common/schoolList',
    method: 'GET',
    data: params,
  });
}
// 查看某个学校下的老师列表
export function getTeacherList(params) {
  return fetch({
    url: '/launch/common/teacherList',
    method: 'GET',
    data: params,
  });
}
// 查看某个学校下的班级列表
export function getClassesList(params) {
  return fetch({
    url: '/launch/common/classesList',
    method: 'GET',
    data: params,
  });
}

export function getAppList(params) {
  return fetch({
    url: '/launch/appManage/appList',
    method: 'GET',
    data: params,
  });
}
export function getAppInfo(params) {
  return fetch({
    url: '/launch/appManage/appInfo',
    method: 'GET',
    data: params,
  });
}
export function getAppVersionList(params) {
  return fetch({
    url: '/launch/appManage/appVersionList',
    method: 'GET',
    data: params,
  });
}
export function onlineApp(params) {
  return fetch({
    url: '/launch/appManage/onlineApp',
    method: 'POST',
    data: params,
  });
}
export function updateVersionStatus(params) {
  return fetch({
    url: '/launch/appManage/updateVersionStatus',
    method: 'POST',
    data: params,
  });
}

// 新增app或者发布新版本
export function issueApp(params) {
  return fetch({
    url: '/launch/appManage/issueApp',
    method: 'POST',
    data: params,
  });
}
// app上下架
export function updateStatusApp(params) {
  return fetch({
    url: '/launch/appManage/updateStatus',
    method: 'POST',
    data: params,
  });
}
// 学校列表
export function getSchoolManageList(params) {
  return fetch({
    url: '/launch/schoolManage/schoolList',
    method: 'GET',
    data: params,
  });
}
// 批量上线launch
export function batchOnlineLaunch(params) {
  return fetch({
    url: '/launch/schoolManage/batchOnlineLaunch',
    method: 'POST',
    data: params,
  });
}
// 批量上线app
export function batchOnlineApp(params) {
  return fetch({
    url: '/launch/schoolManage/batchOnlineApp',
    method: 'POST',
    data: params,
  });
}
export function schoolLaunchList(params) {
  return fetch({
    url: '/launch/schoolManage/launchList',
    method: 'GET',
    data: params,
  });
}
export function schoolAppList(params) {
  return fetch({
    url: '/launch/schoolManage/appVersionList',
    method: 'GET',
    data: params,
  });
}
export function schoolInfo(params) {
  return fetch({
    url: '/launch/schoolManage/schoolInfo',
    method: 'GET',
    data: params,
  });
}
export function schoolDetailLaunchList(params) {
  return fetch({
    url: '/launch/schoolManage/schoolLaunchList',
    method: 'GET',
    data: params,
  });
}
export function schoolDetailAppList(params) {
  return fetch({
    url: '/launch/schoolManage/appList',
    method: 'GET',
    data: params,
  });
}
export function debugQuery(params) {
  return fetch({
    url: '/launch/debug/command/query',
    method: 'GET',
    data: params,
  });
}
export function debugOnoff(params) {
  return fetch({
    url: '/launch/debug/command/onoff',
    method: 'PUT',
    data: params,
  });
}
export function debugUpdate(params) {
  return fetch({
    url: '/launch/debug/command/update',
    method: 'PUT',
    data: params,
  });
}
